#ifndef TESTDB_H
#define TESTDB_H

#include <QObject>
#include <QTest>
#include "databaseManager.h"

class Testdb : public QObject
{
    Q_OBJECT

private slots:
    void initTestCase();
    void cleanupTestCase();

    void testGetTableRowCounts();

    // Test functions for Authentication table operations
    void testInsertAuthentication();
    void testCheckAuthentication();
    void testUpdateAuthentication();
    void testDeleteAuthentication();
    void testGetAuthenticationModel();

    // Test functions for PurchaseOrder table operations
    void testPurchaseOrderHelperOfInsert();
    void testInsertPurchaseOrder();
    void testGetPurchaseOrderModel();
    void testMarkPurchaseOrderAsCompleted();
    void testGetPurchaseOrderById();
    void testGetPurchaseOrderDateAndCondition();

    // Test functions for Finance table operations
    void testInsertFinanceRecord();
    void testGetFinanceTableModel();
    // void testGetFinanceRecordById();
    void testGetFinanceLastTotal();
    // void testGetFinanceRecordsForLinePlot();

    // Test functions for EnterRecord table operations
    void testInsertEnterRecord();
    void testGetEnterRecordModel();
    void testGetEnterRecordById();

    // Test functions for Inventory table operations
    void testChangeInventory();
    void testgetInventoryForPiePlot();
    void testGetInventoryByType();
};
#endif // TESTDB_H
